package com.coder.bike.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 共享单车租赁类型表
 * </p>
 *
 * @author 沈诩宸
 * @since 2025-04-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("busi_rental_type")
@ApiModel(value = "RentalType对象", description = "共享单车租赁类型表")
public class RentalType implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("租赁类型ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("类型名称(如:按时租/按天租/包月租)")
    private String typeName;

    @ApiModelProperty("单位价格(元)")
    private BigDecimal priceUnit;

    @ApiModelProperty("折扣率(0-1)")
    private Double typeDiscount;

    @ApiModelProperty("最大租赁时长(单位:分钟)")
    private Integer maxDuration;

    @ApiModelProperty("押金比例(0-1)")
    private BigDecimal depositRatio;

    @ApiModelProperty("类型图标URL")
    private String iconUrl;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("逻辑删除")
    private Boolean deleted;

    @TableField(exist = false)
    private Double lowDiscount;

    @TableField(exist = false)
    private Double highDiscount;
}
